import React, { Component } from 'react';
import './ui.less';
import {Button, message, Card} from 'antd';
class messages extends Component {
    info = (type) => {
        message[type]('这是一条消息')
    }
    render() {
        return (
            <div>
                <Card title="全局提示框">
                    <Button type="primary" onClick={() => this.info('success')}>success</Button>
                    <Button type="primary" onClick={() => this.info('error')}>error</Button>
                    <Button type="primary" onClick={() => this.info('info')}>info</Button>
                    <Button type="primary" onClick={() => this.info('warning')}>warning</Button>
                    <Button type="primary" onClick={() => this.info('warn')}>warn</Button>
                    <Button type="primary" onClick={() => this.info('loading')}>loading</Button>
                </Card>
            </div>
        );
    }
}

export default messages;